[gradle-0.2] Kotlin DSL fixes and functional test framework#13
[gradle-0.2] Kotlin DSL fixes and functional test framework#13LexManos wants to merge 4 commits intoMinecraftForge:mainfrom
Conversation
|
I mentioned the other day that we need to make a Gradle plugin to streamline plugin development. This Eclipse-specific stuff to make the plugin tests happy are a perfect example of this. |
Jonathing
left a comment
There was a problem hiding this comment.
Looks good. Thanks for your work.
Ya, its a set of 'magic' that may be needed for gradle utils or something. This functional test stuff would also be useful as a external library. There are a bunch of helpers gradle uses their their functional tests, but one of them are exposed as a consumable library. I cant find any other 3rd party library for these helpers. Plus we have multiple plugins that could benefit from a fucntional test setup. So seems like we'll have to roll our own. |
|
Alright, refactored the code to be a little cleaner/isolate functions. I don't think there are any other examples we need but if anyone wants more, I can write them up just ask here or in MDKExamples. Note: the functional tests do not show any failure/problem reporting tests, because I don't think they are needed. But they can easily be added. The GroovyProject and KotlinProject show the example code. Where GradleProject is all the helper. This isolates the actual buildscript code nicely allowing very easy comparisons between groovy and kotlin. Give this a sanity check when you can @Jonathing and if it works for you pull it. |
I am not a fan of Kotlin, and Gradle's docs are as good as you would expect.
But I figured out something functional.
Added a simple kotlin and groovy functional test.
We need to figure out what features are expected write up tests for them.
Note, I had to do some stupid hacks to get pluginUnderTestMetadata to function under eclipse (got to love gradle's consistency) but should be fine under IDEA.
I also disabled the broken TestPathFS tests. I have no clue what the original intention of these tests were but I did a checkout of the original commit and they are broken as well. So I don't expect they ever functioned.
I added a default override for
jarJar.configure(this)that takes no Action so that kotlin compiles fine. Before you neededjarJar.configure(this){}If you wanna run it from the command line its
:jarjar-gradle:functionalTest